<template>
    <div class="all-home">
        <!-- <div style="text-align:center;font-size:28px;font-weight:bold;">{{$route.name}}</div> -->
        <div class="top">
            <div class="order-amount-all" @click="goCarWash">
                <div class="order-amount">
                    <div class="order-amount-flex">
                        <div class="order-amount-price">￥{{wash_money}}</div>
                        <div class="order-amount-title">订单金额</div>
                    </div>
                    <svg
                        t="1597902421592"
                        class="icon"
                        viewBox="0 0 1024 1024"
                        version="1.1"
                        xmlns="http://www.w3.org/2000/svg"
                        p-id="4592"
                        width="200"
                        height="200"
                    >
                        <path
                            d="M512 18.5c-272.111 0-493.5 221.321-493.5 493.568 0 272.111 221.389 493.5 493.5 493.5 272.179 0 493.568-221.321 493.568-493.5 0-272.247-221.457-493.568-493.568-493.568zM512 937.233c-234.496 0-425.233-190.805-425.233-425.233 0-234.564 190.737-425.301 425.233-425.301 234.564 0 425.301 190.805 425.301 425.301 0 234.496-190.805 425.233-425.301 425.233zM631.057 254.703l-78.165 143.906c-20.821 39.049-33.587 65.058-38.229 77.756h-1.365c-13.722-31.13-52.497-104.994-116.326-221.662h-73.387l136.602 234.701h-112.026v52.019h131.209v71.202h-131.209v52.77h131.209v103.97h65.263v-103.97h126.635v-52.77h-126.635v-71.202h126.635v-52.019h-108.681l137.967-234.701h-69.495z"
                            p-id="4593"
                            fill="rgba(230, 230, 230,0.8)"
                        />
                    </svg>
                </div>
                <!-- <div class="order-amount-footer" @click="goCarWash">More Info ➯</div> -->
            </div>
            <div class="order-amount-all car-wash" @click="goCarWash">
                <div class="order-amount">
                    <div class="order-amount-flex">
                        <div class="order-amount-price">{{wash_num}}台</div>
                        <div class="order-amount-title">洗车台次</div>
                    </div>
                    <svg
                        t="1597901892505"
                        class="icon"
                        viewBox="0 0 1024 1024"
                        version="1.1"
                        xmlns="http://www.w3.org/2000/svg"
                        p-id="2878"
                        data-spm-anchor-id="a313x.7781069.0.i20"
                    >
                        <path
                            d="M981.6 314.6c-25.7-60.7-62.4-115.2-109.2-162-46.8-46.8-101.3-83.5-162-109.2C647.5 16.8 580.8 3.3 512 3.3c-68.8 0-135.5 13.5-198.4 40.1-60.7 25.7-115.2 62.4-162 109.2s-83.5 101.3-109.2 162C15.8 377.5 2.3 444.2 2.3 513c0 68.8 13.5 135.5 40.1 198.4 25.7 60.7 62.4 115.2 109.2 162s101.3 83.5 162 109.2c62.8 26.6 129.6 40.1 198.4 40.1 68.8 0 135.5-13.5 198.4-40.1 60.7-25.7 115.2-62.4 162-109.2 46.8-46.8 83.5-101.3 109.2-162 26.6-62.8 40.1-129.6 40.1-198.4 0-68.8-13.5-135.5-40.1-198.4zM512 982.7C253 982.7 42.3 772 42.3 513S253 43.3 512 43.3 981.7 254 981.7 513 771 982.7 512 982.7z"
                            fill="rgba(230, 230, 230,0.8)"
                            p-id="2879"
                            data-spm-anchor-id="a313x.7781069.0.i13"
                            class
                        />
                        <path
                            d="M305.9 294.4c15.1 11 33.7 24.7 55.7 41.2 15.1 8.2 28.1 6.2 39.2-6.2 9.6-15.1 8.2-28.9-4.1-41.2-12.4-11-32.3-24.7-59.8-41.2-16.5-6.9-29.6-4.1-39.2 8.2-8.3 15.2-5.6 28.2 8.2 39.2zM283.2 428.4c22 15.1 39.2 28.2 51.5 39.2 16.5 12.4 30.9 11 43.3-4.1 9.6-16.5 6.9-31.6-8.2-45.3-8.2-8.2-22.7-19.9-43.3-35 0 1.4-1.4 0.7-4.1-2.1-19.3-9.6-34.4-8.2-45.3 4.1-11.1 16.4-9 30.8 6.1 43.2z"
                            fill="rgba(230, 230, 230,0.8)"
                            p-id="2880"
                            data-spm-anchor-id="a313x.7781069.0.i16"
                            class
                        />
                        <path
                            d="M722.3 494.4c16.5-1.4 25.4-11 26.8-28.9-1.4-17.8-9.6-27.5-24.7-28.9H604.8v-66h105.1c15.1-1.4 23.4-10.3 24.7-26.8-1.4-16.5-9.6-25.4-24.7-26.8H604.8v-55.7c-1.4-15.1-11-23.4-28.9-24.7-17.9 1.4-27.5 9.6-28.9 24.7V317h-63.9c0-1.4 1.4-3.4 4.1-6.2 4.1-9.6 7.5-17.8 10.3-24.7 5.5-19.2 0-31.6-16.5-37.1-19.3-4.1-33 3.4-41.2 22.7-12.4 38.5-27.5 72.1-45.3 101-9.6 19.3-7.6 34.4 6.2 45.3 16.5 8.2 30.9 3.4 43.3-14.4 5.5-9.6 11.7-20.6 18.6-33H547v66H411c-15.1 1.4-23.4 11-24.7 28.9 0 17.9 7.5 27.5 22.7 28.9h68c0 50.9-6.2 87.3-18.6 109.2-12.4 23.4-37.1 44-74.2 61.8-16.5 6.9-22 18.6-16.5 35 6.9 16.5 19.2 22 37.1 16.5 93.4-33 137.4-107.2 131.9-222.6H578v160.8c0 39.8 23.4 59.8 70.1 59.8H679c26.1 1.4 43.3-6.9 51.5-24.7 9.6-15.1 14.4-46.7 14.4-94.8-1.4-19.2-11-29.5-28.9-30.9-17.9 1.4-27.5 11.7-28.9 30.9 1.4 49.5-3.4 70.8-14.4 63.9h-20.6c-11 0-16.5-4.1-16.5-12.4V494.4h86.7z"
                            fill="rgba(230, 230, 230,0.8)"
                            p-id="2881"
                            data-spm-anchor-id="a313x.7781069.0.i14"
                            class
                        />
                        <path
                            d="M369.8 519.1c-17.9-4.1-30.2 2.1-37.1 18.6-15.1 48.1-34.4 92.8-57.7 134-8.2 17.8-4.1 31.6 12.4 41.2 17.8 6.9 32.3 1.4 43.3-16.5 24.7-44 43.3-90.7 55.7-140.2 4-17.9-1.5-30.2-16.6-37.1z"
                            fill="rgba(230, 230, 230,0.8)"
                            p-id="2882"
                            data-spm-anchor-id="a313x.7781069.0.i15"
                            class
                        />
                    </svg>
                </div>
                <!-- <div class="order-amount-footer car-wash-footer" @click="goCarWash">More Info ➯</div> -->
            </div>
            <div class="order-amount-all equipment" @click="goEquipment">
                <div class="order-amount">
                    <div class="order-amount-flex">
                        <div class="order-amount-price">{{deviceNumber}}台</div>
                        <div class="order-amount-title">设备数量</div>
                    </div>
                    <svg
                        t="1597998549779"
                        class="icon"
                        viewBox="0 0 1024 1024"
                        version="1.1"
                        xmlns="http://www.w3.org/2000/svg"
                        p-id="48802"
                    >
                        <path
                            d="M511 315.82c-108.17 0-196.18 88-196.18 196.18s88 196.18 196.18 196.18 196.18-88 196.18-196.18S619.17 315.82 511 315.82z m0 323.13c-69.99 0-126.95-56.96-126.95-126.95S441.01 385.05 511 385.05 637.95 442.01 637.95 512 580.99 638.95 511 638.95z"
                            p-id="48803"
                            data-spm-anchor-id="a313x.7781069.0.i180"
                            class="selected"
                            fill="rgba(230, 230, 230,0.8)"
                        />
                        <path
                            d="M511 512m-57.73 0a57.73 57.73 0 1 0 115.46 0 57.73 57.73 0 1 0-115.46 0Z"
                            p-id="48804"
                            data-spm-anchor-id="a313x.7781069.0.i181"
                            class="selected"
                            fill="rgba(230, 230, 230,0.8)"
                        />
                        <path
                            d="M511 12C234.86 12 11 235.86 11 512s223.86 500 500 500 500-223.86 500-500S787.14 12 511 12z m0 69.22c225.87 0 411.56 174.77 429.26 396.16h-96.44c-17.38-168.31-160-300.01-332.82-300.01s-315.44 131.7-332.82 300.01H81.74C99.44 256 285.13 81.22 511 81.22z m0 861.56C285.13 942.78 99.44 768 81.74 546.62H211c19.04 0 34.62-15.58 34.62-34.62 0-0.03-0.01-0.07-0.01-0.1 0.05-146.29 119.09-265.3 265.39-265.3 146.33 0 265.4 119.07 265.4 265.4 0 19.04 15.58 34.62 34.62 34.62h129.25C922.56 768 736.87 942.78 511 942.78z"
                            p-id="48805"
                            data-spm-anchor-id="a313x.7781069.0.i179"
                            class="selected"
                            fill="rgba(230, 230, 230,0.8)"
                        />
                    </svg>
                </div>
                <!-- <div class="order-amount-footer equipment-footer" @click="goCarWash">More Info ➯</div> -->
            </div>
        </div>
        <div class="middle">
            <div class="middle-left">
                <div class="middle-left-top">
                    <div class="middle-left-top-title">店铺</div>
                    <!-- <el-input class="middle-left-top-input" type="text" placeholder="请输入店铺名称"></el-input> -->
                    <el-select class="middle-left-top-input" @change="searchClick" placeholder="请选择店铺名称" v-model="searchshop">
                        <el-option v-for="item in shopname" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                </div>
                <div class="home-echart" id="echart" ref="homeEchart"></div>
            </div>
            <div class="middle-right">
                <!-- 表格 -->
                <el-table
                    :data="equipmentTable"
                    border
                    height="520"
                    :style="{width:screenWidth+'px'}"
                    :cell-style="cellStyle"
                    :header-cell-style="rowClass"
                    sort-change="sortChange"
                >
                    <!-- <el-table-column type="selection" width="80px"></el-table-column> -->
                    <el-table-column type="index" label="序号" width="93px">
                        <template slot-scope="scope">
                            <svg v-if="scope.$index+1==1" class="icon-1" aria-hidden="true">
                                <use xlink:href="#icon-guanjun" />
                            </svg>
                            <svg
                                v-else-if="scope.$index+1==2"
                                class="icon-1 icon1"
                                aria-hidden="true"
                            >
                                <use xlink:href="#icon-yajun" />
                            </svg>
                            <svg
                                v-else-if="scope.$index+1==3"
                                class="icon-1 icon2"
                                aria-hidden="true"
                            >
                                <use xlink:href="#icon-jijun" />
                            </svg>
                            <span v-else>{{ scope.row.id }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="门店名称" width="260px">
                        <template slot-scope="scope">
                            <span>{{ scope.row.name }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column sortable prop="wash_num" label="洗车次数" width="150px">
                        <template slot-scope="scope">
                            <span>{{ scope.row.wash_num }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column sortable prop="wash_money" label="洗车金额" width="150px">
                        <template slot-scope="scope">
                            <span>￥{{ scope.row.wash_money }}</span>
                        </template>
                    </el-table-column>
                </el-table>

                <!-- 分页 -->
                <div class="table-footer">
                    <el-pagination
                        @size-change="pageCount"
                        @current-change="currentPageCount"
                        :current-page="currentPage"
                        :page-sizes="[10, 50,100,150, 200]"
                        :page-size="currentCount"
                        layout="prev, pager, next, jumper, sizes,total"
                        :total="pageResultSize"
                    ></el-pagination>
                    <el-button @click="goEquipment()" type="primary">设备详情</el-button>
                </div>
            </div>
        </div>
        <!-- <div class="bottom">
            <div class="bottom-right">
                <div class="bottom-right-all">
                    <div class="home-flex" @click="goEquipment">
                        <svg
                            t="1597992429279"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="12106"
                        >
                            <path
                                d="M733.023573 0m79.786667 0l131.84 0q79.786667 0 79.786667 79.786667l0 860.586666q0 79.786667-79.786667 79.786667l-131.84 0q-79.786667 0-79.786667-79.786667l0-860.586666q0-79.786667 79.786667-79.786667Z"
                                p-id="12107"
                                data-spm-anchor-id="a313x.7781069.0.i95"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M945.076907 384c15.786667 0 28.586667-17.92 28.586666-40.533333s-12.8-42.666667-28.586666-42.666667H811.103573c-15.786667 0-28.586667 18.346667-28.586666 42.666667s12.8 40.533333 28.586666 40.533333zM945.076907 226.133333c15.786667 0 28.586667-18.346667 28.586666-42.666666s-12.8-40.533333-28.586666-40.533334H811.103573c-15.786667 0-28.586667 17.92-28.586666 40.533334s12.8 42.666667 28.586666 42.666666z"
                                p-id="12108"
                                data-spm-anchor-id="a313x.7781069.0.i94"
                                class
                                fill="#ffffff"
                            />
                            <path
                                d="M0.436907 762.88a95.573333 95.573333 0 0 0 85.333333 104.106667h183.466667v99.84H174.09024a29.44 29.44 0 0 0 0 57.173333h341.333333a29.44 29.44 0 0 0 0-57.173333H417.716907v-99.84h184.746666a95.573333 95.573333 0 0 0 85.333334-104.106667v-23.893333H0.436907zM605.023573 216.32H85.77024a96 96 0 0 0-85.333333 104.533333v366.08h688.213333V320.853333a96 96 0 0 0-83.626667-104.533333z m-73.386666 192.426667v85.333333h-45.226667s-3.84 11.52-5.973333 17.066667a133.546667 133.546667 0 0 1-6.4 13.653333l32 34.56-56.32 60.586667-32-34.133334-13.226667 11.52a96.426667 96.426667 0 0 1-16.64 6.4H384.436907v49.066667H305.93024v-49.92a116.906667 116.906667 0 0 1-17.066667-6.4l-12.8-6.4-32 34.133333-58.026666-61.44 32-34.56a131.84 131.84 0 0 1-4.266667-13.653333 115.2 115.2 0 0 1-5.973333-17.066667H160.01024v-85.333333H205.236907a161.28 161.28 0 0 1 12.8-33.706667L186.036907 341.333333l56.32-61.44 32 34.56A159.146667 159.146667 0 0 1 305.93024 298.666667V251.733333H384.436907V298.666667a145.493333 145.493333 0 0 1 31.146666 14.08l32-34.56L505.61024 341.333333l-32.426667 34.56a162.56 162.56 0 0 1 13.226667 33.706667z m-186.026667 139.946666a97.28 97.28 0 1 1 97.28-96.853333 96.853333 96.853333 0 0 1-97.28 96.853333z"
                                p-id="12109"
                                data-spm-anchor-id="a313x.7781069.0.i93"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>设备管理</span>
                    </div>
                    <div class="home-flex" @click="goFinancialSheet">
                        <svg
                            t="1597992024105"
                            class="icon"
                            viewBox="0 0 1026 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="5601"
                        >
                            <path
                                d="M64.120225 1024c-35.394364 0-64.120225-70.852849-64.120225-104.708328V122.597871a64.120225 64.120225 0 0 1 128.240451 0V895.759549h833.56293a64.120225 64.120225 0 1 1 0 128.240451z m705.32248-192.360676v-320.601127h128.240451v320.601127z m-256.480902 0v-448.841578h128.240451v448.841578z m-256.480901 0v-384.721353h128.240451v384.721353z m531.556668-416.781466L546.17608 154.080902 344.582091 355.803131c-56.81052 43.601753-137.024922-53.283907-80.086161-96.821541l256.480902-245.323982a65.979712 65.979712 0 0 1 93.615529 14.10645L833.56293 254.557295l64.120226-128.240451c42.383469-54.438071 133.241828-25.006888 128.240451 64.120226l-132.921228 227.113838a68.031559 68.031559 0 0 1-52.193863 30.392987 65.915592 65.915592 0 0 1-52.770946-33.086037z"
                                fill="#999999"
                                p-id="5602"
                            />
                        </svg>
                        <span>财务报表</span>
                    </div>
                    <div class="home-flex" @click="goUserCenter">
                        <svg
                            t="1597992317652"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="10547"
                        >
                            <path
                                d="M853.333333 0h-682.666666C75.093333 0 0 75.093333 0 170.666667v682.666666C0 948.906667 75.093333 1024 170.666667 1024h682.666666c95.573333 0 170.666667-75.093333 170.666667-170.666667v-682.666666C1024 75.093333 948.906667 0 853.333333 0zM955.733333 853.333333c0 54.613333-47.786667 102.4-102.4 102.4h-682.666666c-54.613333 0-102.4-47.786667-102.4-102.4v-682.666666C68.266667 116.053333 116.053333 68.266667 170.666667 68.266667h682.666666c54.613333 0 102.4 47.786667 102.4 102.4v682.666666z"
                                p-id="10548"
                                data-spm-anchor-id="a313x.7781069.0.i81"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M716.8 375.466667c0-116.053333-88.746667-204.8-204.8-204.8s-204.8 88.746667-204.8 204.8c0 61.44 27.306667 116.053333 68.266667 157.013333-122.88 40.96-204.8 157.013333-204.8 286.72 0 20.48 13.653333 34.133333 34.133333 34.133333s34.133333-13.653333 34.133333-34.133333c0-129.706667 109.226667-238.933333 238.933334-238.933333h34.133333c116.053333 0 204.8-88.746667 204.8-204.8z m-204.8 136.533333c-75.093333 0-136.533333-61.44-136.533333-136.533333s61.44-136.533333 136.533333-136.533334 136.533333 61.44 136.533333 136.533334-61.44 136.533333-136.533333 136.533333zM785.066667 614.4h-204.8c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h204.8c20.48 0 34.133333-13.653333 34.133333-34.133334s-13.653333-34.133333-34.133333-34.133333zM785.066667 750.933333h-204.8c-20.48 0-34.133333 13.653333-34.133334 34.133334s13.653333 34.133333 34.133334 34.133333h204.8c20.48 0 34.133333-13.653333 34.133333-34.133333s-13.653333-34.133333-34.133333-34.133334z"
                                p-id="10549"
                                data-spm-anchor-id="a313x.7781069.0.i82"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>用户中心</span>
                    </div>
                    <div class="home-flex" @click="goPrice">
                        <svg
                            t="1597992512962"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="13302"
                        >
                            <path
                                d="M378.510407 79.375755l251.721045 0 0 62.929506-251.721045 0 0-62.929506Z"
                                p-id="13303"
                                data-spm-anchor-id="a313x.7781069.0.i102"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M944.883011 79.375755 819.021985 79.375755l0 62.929506 125.861026 0 0 188.790532L63.858849 331.095793 63.858849 142.305261l125.860019 0 0-62.929506L63.858849 79.375755c-65.265449 0-62.930513 64.558625-62.930513 62.929506l0 818.093649c0 61.272195 60.59457 62.930513 62.930513 62.930513l881.024162 0c57.399765 0 62.929506-60.593563 62.929506-62.930513l0-818.093649C1007.812517 138.035117 1006.153192 79.375755 944.883011 79.375755M944.883011 960.39891 63.858849 960.39891 63.858849 394.026307l881.024162 0L944.883011 960.39891z"
                                p-id="13304"
                                data-spm-anchor-id="a313x.7781069.0.i98"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M724.870382 204.406112c17.57898 0 31.835282-18.742924 31.835282-41.850639L756.705664 58.234462c0-23.046295-14.256302-41.78922-31.835282-41.78922-17.513533 0-31.835282 18.743931-31.835282 41.78922L693.0351 162.555473C693.0351 185.663188 707.357856 204.406112 724.870382 204.406112"
                                p-id="13305"
                                data-spm-anchor-id="a313x.7781069.0.i101"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M284.42123 204.406112c17.145018 0 31.096238-18.742924 31.096238-41.850639L315.517468 58.234462c0-23.046295-13.95122-41.78922-31.096238-41.78922-17.207444 0-31.22109 18.743931-31.22109 41.78922L253.20014 162.555473C253.201147 185.663188 267.214793 204.406112 284.42123 204.406112"
                                p-id="13306"
                                data-spm-anchor-id="a313x.7781069.0.i100"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M441.499319 897.469404 567.301947 897.469404 567.301947 771.609385 756.092479 771.609385 756.092479 708.678872 567.301947 708.678872 567.301947 645.748359 756.092479 645.748359 756.092479 582.818853 693.161966 582.818853 693.161966 456.957826 630.231453 456.957826 630.231453 519.887333 567.301947 519.887333 567.301947 582.818853 441.499319 582.818853 441.499319 519.887333 378.569813 519.887333 378.569813 456.957826 315.6393 456.957826 315.6393 582.818853 252.708787 582.818853 252.708787 645.748359 441.499319 645.748359 441.499319 708.678872 252.708787 708.678872 252.708787 771.609385 441.499319 771.609385Z"
                                p-id="13307"
                                data-spm-anchor-id="a313x.7781069.0.i99"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>价格管理</span>
                    </div>
                    <div class="home-flex" @click="goCarWash">
                        <svg
                            t="1597992666314"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="18129"
                        >
                            <path
                                d="M912.6912 772.4544a20.03456 20.03456 0 0 0 20.03968-20.03456V111.30368a20.03456 20.03456 0 0 0-20.03456-20.03456H471.93088a20.03456 20.03456 0 0 0-20.03456 20.03456v60.1088h140.24192c33.19808 0 60.1088 26.9056 60.1088 60.09856v310.784c71.02976 25.06752 120.20736 92.65152 120.20736 170.05056 0 20.7616-3.52256 41.02144-10.2656 60.1088h150.50752z m0-721.2544c33.19808 0 60.1088 26.91072 60.1088 60.1088v641.11104c0 33.19296-26.91072 60.10368-60.1088 60.10368h-216.45312l17.39264-30.06976a139.48928 139.48928 0 0 0 18.74944-70.10816c0-64.3584-43.7248-120.0128-105.1648-135.82336l-15.04256-3.87072V231.51104a20.03456 20.03456 0 0 0-20.03456-20.03456H411.8272V111.3088C411.8272 78.11072 438.7328 51.2 471.93088 51.2h440.76544z m-225.28 607.9488a20.03456 20.03456 0 0 1-1.9968 28.2624l-110.81216 96.16384a20.03456 20.03456 0 0 1-28.27264-2.00704l-49.46944-57.09312a20.03456 20.03456 0 1 1 30.27968-26.24l36.34176 41.9328 95.6672-83.0208a20.03456 20.03456 0 0 1 28.2624 1.9968zM512 451.8912a20.03456 20.03456 0 0 1 0 40.07424H191.44192a20.03456 20.03456 0 0 1 0-40.06912H512z m0-120.20224a20.03456 20.03456 0 0 1 0 40.06912H191.44192a20.03456 20.03456 0 0 1 0-40.06912H512z m80.13824 560.9728c-99.584 0-180.31104-80.73216-180.31104-180.31616 0-99.584 80.72704-180.31104 180.31104-180.31104s180.31616 80.72704 180.31616 180.31104-80.73216 180.31616-180.31616 180.31616z m0-40.06912c77.45536 0 140.24192-62.79168 140.24192-140.24704 0-77.45024-62.78656-140.2368-140.2368-140.2368-77.46048 0-140.24704 62.78656-140.24704 140.2368 0 77.45536 62.78656 140.24704 140.24192 140.24704z m20.03456-319.45728v-301.6192a20.03456 20.03456 0 0 0-20.03456-20.03968H111.3088a20.03456 20.03456 0 0 0-20.03456 20.03456v681.18528a20.03456 20.03456 0 0 0 20.03456 20.03456h480.83456a20.03456 20.03456 0 0 0 20.03456-20.03456v-21.13536a182.08768 182.08768 0 0 1-20.03456 1.1008c-99.584 0-180.31104-80.73216-180.31104-180.31616 0-99.584 80.72704-180.31104 180.31104-180.31104 6.7328 0 13.4144 0.36864 20.03456 1.1008z m15.04256 43.38688a140.53376 140.53376 0 0 0-35.072-4.41856c-77.46048 0-140.24704 62.79168-140.24704 140.24192 0 77.45536 62.78656 140.24704 140.24192 140.24704 11.97056 0 23.72096-1.49504 35.072-4.41856l25.0368-6.44096v70.9632c0 33.19296-26.91072 60.10368-60.1088 60.10368H111.3088C78.11072 972.8 51.2 945.88928 51.2 912.6912V231.51616c0-33.19296 26.91072-60.10368 60.1088-60.10368h480.82944c33.19808 0 60.1088 26.91072 60.1088 60.1088v351.44704l-25.0368-6.44096z"
                                p-id="18130"
                                data-spm-anchor-id="a313x.7781069.0.i105"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>订单系统</span>
                    </div>
                    <div class="home-flex" @click="goCampaign">
                        <svg
                            t="1597992250042"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="10029"
                        >
                            <path
                                d="M1019.865824 767.199065c-2.399684-12.398369-11.698461-22.297067-23.996843-25.196685-14.798053-3.49954-27.096435-12.698329-34.695435-25.896593-7.599-13.29825-9.298777-28.896198-4.799369-43.794238 3.599526-11.998421-0.099987-25.096698-9.49875-33.29562-21.297198-18.69754-45.693988-32.895672-72.29049-42.294435-11.898435-4.199448-25.296672-0.899882-33.89554 8.498882-10.298645 11.298514-24.296803 17.497698-39.29483 17.497698-14.998027 0-28.896198-6.199184-39.294831-17.497698-8.598869-9.398763-21.897119-12.698329-33.89554-8.398895-26.696488 9.398763-50.993291 23.696882-72.390476 42.394422-9.398763 8.198921-13.198264 21.297198-9.498751 33.29562 4.499408 14.89804 2.799632 30.396001-4.799368 43.694251-7.499013 13.29825-19.797395 22.49704-34.595449 25.896593-12.398369 2.899619-21.797132 12.798316-24.09683 25.196685-2.699645 14.098145-3.999474 28.296277-3.999474 42.194449 0 13.798185 1.299829 27.996317 3.999474 42.194449 2.399684 12.398369 11.798448 22.297067 23.996843 25.096698 14.798053 3.49954 27.096435 12.698329 34.695436 25.896593 7.599 13.398237 9.298777 28.896198 4.799368 43.794238-3.599526 11.998421 0.099987 25.096698 9.498751 33.29562 21.297198 18.69754 45.693988 32.895672 72.390476 42.394422 3.399553 1.199842 6.899092 1.799763 10.498618 1.799764 8.898829 0 17.397711-3.699513 23.296935-10.198659 10.398632-11.298514 24.39679-17.497698 39.294831-17.497698 14.998027 0 28.896198 6.199184 39.29483 17.497698 8.598869 9.298777 21.797132 12.598343 33.895541 8.498882 26.596501-9.398763 50.993291-23.596896 72.390476-42.394422 9.398763-8.198921 13.098277-21.297198 9.49875-33.29562-4.499408-14.89804-2.799632-30.396001 4.799369-43.694251 7.599-13.29825 19.897382-22.49704 34.595448-25.896593 12.298382-2.799632 21.697145-12.698329 24.09683-25.196685 2.699645-14.198132 3.999474-28.396264 3.999474-42.194449 0-13.998158-1.299829-28.19629-3.999474-42.394423z m-42.494409 68.49099c-23.296935 7.599-42.594396 23.296935-54.892779 44.894093-12.298382 21.597159-16.097882 46.393896-10.898566 70.490726-13.598211 10.898566-28.496251 19.697409-44.494146 26.096567-18.097619-16.597816-41.19458-25.596632-65.791344-25.596633-24.596764 0-47.693725 8.998816-65.791345 25.596633-16.097882-6.499145-30.995922-15.198001-44.494146-26.096567 5.199316-24.09683 1.399816-48.893567-10.798579-70.490726-12.298382-21.597159-31.595843-37.295093-54.892778-44.894093-1.299829-8.898829-1.999737-17.697672-1.999737-26.296541 0-8.598869 0.699908-17.397711 1.999737-26.29654 23.296935-7.599 42.594396-23.296935 54.892778-44.894094 12.298382-21.597159 15.997895-46.393896 10.798579-70.490726 13.498224-10.898566 28.496251-19.597422 44.494146-26.096567 18.097619 16.597816 41.19458 25.596632 65.791345 25.596633 24.696751 0 47.793712-8.998816 65.791344-25.596633 16.097882 6.499145 30.995922 15.198001 44.494146 26.096567-5.199316 24.196817-1.499803 48.893567 10.898566 70.490726 12.298382 21.597159 31.69583 37.39508 54.892779 44.894094 1.299829 8.898829 1.999737 17.697672 1.999736 26.29654 0 8.598869-0.699908 17.497698-1.999736 26.296541z"
                                p-id="10030"
                                data-spm-anchor-id="a313x.7781069.0.i73"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M801.29458 714.306024c-52.393107 0-95.08749 42.694383-95.08749 95.08749 0 52.393107 42.694383 95.08749 95.08749 95.08749 12.298382 0 22.297067-9.998685 22.297066-22.297066s-9.998685-22.297067-22.297066-22.297067c-27.89633 0-50.593344-22.697014-50.593344-50.593344 0-27.89633 22.697014-50.593344 50.593344-50.593343s50.593344 22.697014 50.593343 50.593343c0 12.298382 9.998685 22.297067 22.297067 22.297067s22.297067-9.998685 22.297067-22.297067c-0.099987-52.29312-42.79437-94.987503-95.187477-94.987503zM233.069337 117.084596L111.485333 434.942778h55.692673l28.896198-79.689516h133.082491l28.896199 79.689516h55.692673L292.261549 117.084596h-59.192212z m-21.397185 195.374296L261.965535 173.177216h1.799763l49.893436 139.281676h-101.986582zM561.126177 117.084596H444.941462V434.942778h116.184715c51.293252 0 90.388108-14.198132 117.084596-42.694383 25.496646-27.296409 38.294962-65.991318 38.294962-116.184715 0-50.493357-12.798316-89.188266-38.294962-116.184714-26.696488-28.596238-65.791344-42.79437-117.084596-42.79437z m76.989871 245.767666c-18.39758 18.39758-47.293778 27.596369-86.788582 27.59637h-54.292857V161.578742h54.292857c39.794765 0 68.690963 9.098803 86.788582 27.196422 17.797658 17.797658 26.696488 46.893831 26.696488 87.288516 0 39.094857-8.898829 68.091042-26.696488 86.788582z"
                                p-id="10031"
                                data-spm-anchor-id="a313x.7781069.0.i76"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M556.426795 979.371151H66.791213c-12.298382 0-22.297067-9.998685-22.297067-22.297066V556.426795h776.597829c0.799895 0.099987 1.59979 0.199974 2.399684 0.199974 0.799895 0 1.59979-0.199974 2.399685-0.199974h19.797395V66.791213C845.788726 29.996054 815.892659 0 778.997513 0H66.791213C29.996054 0 0 29.996054 0 66.791213v890.282872C0 993.869244 29.996054 1023.865298 66.791213 1023.865298h489.635582c12.298382 0 22.297067-9.998685 22.297067-22.297067s-9.998685-22.19708-22.297067-22.19708zM44.494146 66.791213c0-12.298382 9.998685-22.297067 22.297067-22.297067h712.2063c12.298382 0 22.297067 9.998685 22.297067 22.297067V511.932649H44.494146V66.791213z"
                                p-id="10032"
                                data-spm-anchor-id="a313x.7781069.0.i74"
                                class="selected"
                                fill="#999999"
                            />
                            <path
                                d="M511.932649 823.591646H137.981847c-12.298382 0-22.297067 9.998685-22.297067 22.297067s9.998685 22.297067 22.297067 22.297066h373.950802c12.298382 0 22.297067-9.998685 22.297066-22.297066s-9.998685-22.297067-22.297066-22.297067zM514.932254 667.712154H137.981847c-12.298382 0-22.297067 9.998685-22.297067 22.297067s9.998685 22.297067 22.297067 22.297066h376.950407c12.298382 0 22.297067-9.998685 22.297067-22.297066s-9.998685-22.297067-22.297067-22.297067z"
                                p-id="10033"
                                data-spm-anchor-id="a313x.7781069.0.i75"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>广告活动管理</span>
                    </div>
                    <div class="home-flex" @click="goClerkManagement">
                        <svg
                            t="1597992718881"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="18461"
                        >
                            <path
                                d="M957.733761 820.331367c-14.034645-54.525847-49.613978-98.958826-96.229668-125.176954 30.411637-27.181059 49.592488-66.679655 49.592488-110.574375 0-81.770352-66.541509-148.311861-148.311861-148.311861s-148.311861 66.541509-148.311861 148.311861c0 43.896766 19.183921 83.398432 49.598628 110.579491-18.444071 10.375302-35.157731 23.602557-49.493228 39.178301-25.723871-73.815169-80.883145-133.945665-151.361313-166.260651 53.043077-37.429471 87.756693-99.17986 87.756693-168.886455 0-113.90319-92.673679-206.576869-206.576869-206.576869s-206.576869 92.673679-206.576869 206.576869c0 69.707618 34.714639 131.456984 87.756693 168.886455-98.575086 45.197388-167.209256 144.802944-167.209256 260.157181 0 17.545608 14.235213 31.780821 31.780821 31.780821s31.780821-14.235213 31.780821-31.780821c0-122.675994 99.791797-222.467791 222.467791-222.467791 122.649388 0 222.423789 99.749842 222.466768 222.39002-0.001023 0.563842 0.013303 1.125637 0.041956 1.685385 0.010233 0.203638 0.030699 0.404206 0.045025 0.607844 0.021489 0.306992 0.039909 0.613984 0.069585 0.918929 1.575892 16.075117 15.137769 28.646434 31.625278 28.646434 15.068184 0 27.686573-10.503215 30.950919-24.581861 15.898085-60.401672 70.567195-102.542444 133.188418-102.542444 62.899562 0 117.730355 42.478464 133.372613 103.288434 3.703345 14.338566 16.614399 23.856337 30.766724 23.856337 2.62785 0 5.276167-0.310062 7.944949-0.99363C951.857936 854.658174 962.100208 837.33974 957.733761 820.331367zM201.382567 399.191748c0-78.852906 64.162322-143.014204 143.014204-143.014204s143.014204 64.162322 143.014204 143.014204-64.162322 143.015228-143.014204 143.015228S201.382567 478.044654 201.382567 399.191748zM678.036547 584.581062c0-46.740534 38.008662-84.749196 84.749196-84.749196s84.749196 38.008662 84.749196 84.749196c0 46.740534-38.008662 84.749196-84.749196 84.749196S678.036547 631.321596 678.036547 584.581062z"
                                p-id="18462"
                                data-spm-anchor-id="a313x.7781069.0.i108"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>店员管理</span>
                    </div>
                    <div class="home-flex" @click="goCarOperation">
                        <svg
                            t="1597992817345"
                            class="icon"
                            viewBox="0 0 1024 1024"
                            version="1.1"
                            xmlns="http://www.w3.org/2000/svg"
                            p-id="20041"
                        >
                            <path
                                d="M434.816 166.08h-36.768l-0.288 0.256c12 6.656 19.904 19.328 19.904 34.112l0.832 135.488H37.888V200.48c0-14.528 8.128-26.944 20.064-33.76H21.056a19.776 19.776 0 0 1-20.096-19.488v-19.584c0-10.784 8.96-19.488 20.096-19.488h20.032V147.2h16.832V63.616c0-21.536 17.952-39.04 40.128-39.04h260.704c22.144 0 40.064 17.504 40.064 39.04l-0.64 82.912h16.544V107.424h20.032c11.104 0 20.064 8.736 20.064 19.552v19.52a19.648 19.648 0 0 1-20 19.584zM158.24 317.632h140.352v-19.52H158.24v19.52z m0-39.072h140.352v-19.584H158.24v19.584z m0-39.104h140.352v-19.52H158.24v19.52zM78.016 298.112c0 10.688 8.992 19.52 20.064 19.52h20a19.84 19.84 0 0 0 20.032-19.52c0-10.88-8.96-19.584-20.032-19.584h-20a19.84 19.84 0 0 0-20.064 19.584z m280.768-214.88a19.84 19.84 0 0 0-20.032-19.616H118.08a19.808 19.808 0 0 0-20 19.616v97.632h260.704V83.232z m0 195.328h-20.032a19.744 19.744 0 0 0-20.064 19.584c0 10.688 8.96 19.52 20.064 19.52h20.032a19.84 19.84 0 0 0 20.032-19.52c0-10.88-8.96-19.584-20.032-19.584z m60.16 76.896a19.776 19.776 0 0 1-20.096 19.488H57.952a19.744 19.744 0 0 1-20.064-19.488v-19.584h381.088v19.584h-0.032z m-280.8 59.136a19.84 19.84 0 0 1-20.032 19.616h-20.032a19.84 19.84 0 0 1-20.064-19.616v-39.104h60.128v39.104z m240.672 0a19.84 19.84 0 0 1-20.032 19.616h-20.032a19.84 19.84 0 0 1-20.064-19.616v-39.104h60.16v39.104h-0.032zM1023.04 395.648c0 21.248-17.248 38.56-38.592 38.56h-332.48a38.56 38.56 0 0 1-38.528-38.56V63.136c0-21.312 17.216-38.56 38.528-38.56h332.48c21.344 0 38.592 17.248 38.592 38.56v332.512zM1023.04 950.176c0 21.28-17.248 38.56-38.592 38.56h-332.48c-21.312 0-38.528-17.28-38.528-38.56V617.664c0-21.248 17.216-38.496 38.528-38.496h332.48c21.344 0 38.592 17.248 38.592 38.496v332.512zM431.392 950.176c0 21.28-17.28 38.56-38.528 38.56H60.384c-21.248 0-38.56-17.28-38.56-38.56V617.664c0-21.248 17.312-38.496 38.56-38.496h332.512c21.248 0 38.528 17.248 38.528 38.496v332.512z"
                                p-id="20042"
                                data-spm-anchor-id="a313x.7781069.0.i111"
                                class="selected"
                                fill="#999999"
                            />
                        </svg>
                        <span>运营车辆管理</span>
                    </div>
                </div>
            </div>
        </div> -->
    </div>
</template>

<script>
import echarts from "echarts";
import utils from "../../util/request.js"
import city_data2017_element from '../../../../dzyun/鼎智云前端/dhzn/src/js/city_data2017_element.js';
export default {
    data() {
        return {
            wash_money:'7,344.00', //订单金额
            wash_num:500, //洗车台次
            deviceNumber:320, //设备数量
            searchshop:"",//查询绑定值
            shopname: "",//查询需要的下拉框数据
            homeDataArrX: [
                "08-01",
                "08-02",
                "08-03",
                "08-04",
                "08-05",
                "08-06",
                "08-07",
                "08-07",
                "08-09",
                "08-10",
                "08-11",
                "08-12",
                "08-13",
                "08-14",
                "08-15"
            ], //显示x轴的数值
            homeDataArrY1: [], //显示y轴的订单金额数值
            homeDataArrY2: [], //显示y轴的订单数量数值
            homeEcharts: null, //日折线图
            // 分页
            currentPage: 1, //初始页面
            currentCount: 10, //当前页面的数据数量
            pageResultSize: 10, //表格数据总数
            screenWidth: window.innerWidth, //可视宽度
            equipmentTable: [
                {
                    // index: 1, //排名
                    name: "店名", //门店名称
                    wash_num: 320, //洗车次数
                    wash_money: 3454 //洗车金额
                },
                {
                    // index: 2, //排名
                    name: "店名", //门店名称
                    wash_num: 352, //洗车次数
                    wash_money: 4128 //洗车金额
                },
                {
                    // index: 3, //排名
                    name: "店名", //门店名称
                    wash_num: 367, //洗车次数
                    wash_money: 4386 //洗车金额
                },
                {
                    // index: 4, //排名
                    name: "店名", //门店名称
                    wash_num: 335, //洗车次数
                    wash_money: 3846 //洗车金额
                },
                {
                    // index: 5, //排名
                    name: "店名", //门店名称
                    wash_num: 315, //洗车次数
                    wash_money: 3384 //洗车金额
                }
            ]
        };
    },
    methods: {
        getEchart() {
            // 获取店铺订单图表
            let date = new Date();
            let year =  date.getFullYear();
            let month = date.getMonth() + 1;
            var d = new Date(year,month,0);
            // console.log(d.getDate());
            // 日期
            var arr = new Array(d.getDate()), i=arr.length;while(i--){arr[i] = i+1+"日";}
            // 金额
            var arrmoney = new Array(d.getDate()), j=arr.length;while(j--){arrmoney[j] = 0;}
            // 次数
            var arrtime = new Array(d.getDate()), k=arr.length;while(k--){arrtime[k] = 0;}


            // console.log(arr,arrmoney,arrtime)
            utils.request("/dayStatement/list","post",JSON.stringify({page:1,list_rows:31,shop_id:this.searchshop})).then(resp=>{
                // console.log(resp)
                let dataorder = JSON.parse(JSON.stringify(resp.data.data.data));
                for(var keytime=0;keytime<dataorder.length;keytime++){
                    let repdate = new Date(dataorder[keytime].day_time*1000)
                    if(repdate.getFullYear() === year && repdate.getMonth()+1 ===month ){
                        // console.log(repdate.getDate())
                        arrmoney[repdate.getDate()-1] += Number(dataorder[keytime].money);
                        arrtime[repdate.getDate()-1] += dataorder[keytime].wash_num
                    }
                }
                // for(var l=0;l<arrmoney.length;l++){
                //     arrmoney[l] = arrmoney[l]+"元";
                //     arrtime[l] = arrtime[l]+"元"
                // }
                this.homeDataArrX = arr
                this.homeEcharts = echarts.init(document.getElementById("echart"));
                this.homeEcharts.setOption({
                    title: {
                        text: month+'月店铺数据',
                        // subtext: '纯属虚构'
                    },
                    tooltip: {
                        trigger: "axis",
                        // formatter: '{a0}:{c0}台<br/>{a1}:{c1}元'
                        formatter: function(params) { //自定义函数修改折线图给数据加单位
                            var str = '';//声明一个变量用来存储数据
                            str += '<div>'+ params[0].name +'</div>'; //显示日期的函数
                            for(var i=0; i<params.length; i++) { //图显示的数据较多时需要循环数据，这样才可以成功的给多条数据添加单位
                                if(i === 0){
                                    str += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+params[i].color+';"></span>'+ params[i].seriesName +'</span> : <span>'+ (params[i].data ? params[i].data+'台' : '暂无') +'</br>';
                                    // console.log(params[i].color,params[i].data)
                                }else if(i===3){
                                    str += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+params[i].color+';"></span>'+ params[i].seriesName +'</span> : <span>'+ (params[i].data ? params[i].data+'分' : '暂无') +'</br>';
                                    // console.log(params[i].color,params[i].data)
                                }else if(i===6){
                                    str += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+params[i].color+';"></span>'+ params[i].seriesName +'</span> : <span>'+ (params[i].data ? params[i].data+'角' : '暂无') +'</br>';
                                    // console.log(params[i].color,params[i].data)
                                }else{
                                    str += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+params[i].color+';"></span>'+ params[i].seriesName +'</span> : <span>'+ (params[i].data ? params[i].data+'元' : '暂无') +'</br>';
                                    // console.log(params[i].color,params[i].data)
                                }
                            }
                            return str;
                        }

                        // },
                    },
                    legend: {},
                    grid: {
                        left: "3%",
                        right: "4%",
                        bottom: "3%",
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: "category",
                            boundaryGap: false,
                            data: this.homeDataArrX
                        }
                    ],
                    yAxis: [
                        {
                            // name: "洗车次数",
                            type: "value"
                            // position:"right",
                        }
                        // {
                        //     name: "订单金额",
                        //     type: "value"
                        //     // position:"left",
                        // }
                    ],
                    series: [
                        {
                            name: "洗车次数",
                            type: "line",
                            smooth: 0.4,
                            lineStyle: {
                                width: 1,
                                color: "#2DA8FF"
                            },
                            areaStyle: {
                                color: "#2DA8FF",
                                opacity: 0.2
                            },
                            yAxisIndex: 0,
                            data: arrtime
                        },
                        {
                            name: "订单金额",
                            type: "line",
                            smooth: 0.4,
                            lineStyle: {
                                width: 1,
                                color: "#FBBB6E"
                            },
                            areaStyle: {
                                color: "#FBBB6E",
                                opacity: 0.2
                            },
                            // yAxisIndex: 0,
                            data: arrmoney
                        }
                    ],
                    color: ["#2DA8FF", "#FBBB6E"]
                });
        
            })
        },
        searchClick(){
            // 店铺查询
            console.log(this.searchshop)
            this.getEchart()
        },
        goFinancialSheet() {
            // 跳转财务报表
            this.$router.push({ path: "/financialSheet" });
        },
        goUserCenter() {
            // 跳转用户中心
            this.$router.push({ path: "/userCenter" });
        },
        goEquipment() {
            // 跳转设备管理
            this.$router.push({ path: "/equipment" });
        },
        goPrice() {
            // 跳转价格管理
            this.$router.push({ path: "/price" });
        },
        goCarWash() {
            // 跳转订单系统
            this.$router.push({ path: "/carWash" });
        },
        goCampaign() {
            // 跳转广告活动
            this.$router.push({ path: "/campaign" });
        },
        goClerkManagement() {
            // 跳转店员管理
            this.$router.push({ path: "/clerkManagement" });
        },
        goCarOperation() {
            // 跳转运营车辆管理
            this.$router.push({ path: "/carOperation" });
        },
        //   表格居中
        cellStyle: function({ row, column, rowIndex, columnIndex }) {
            return "text-align:center;";
        },
        rowClass: function({ row, rowIndex }) {
            return "text-align:center;";
        },
        // 每页数据的数量
        pageCount: function(val) {
            this.currentCount = val;
            // let Base64 = require('js-base64').Base64;
            // let one = Base64.decode('123')
            // console.log(one)
            utils
                .request("/shop/list", "post", JSON.stringify({
                    // machine: this.equipmentSearch.equipmentNumber, //设备号
                    // name: this.equipmentSearch.name, //门店名称
                    // deleteFlag: 0, //查询存续
                    // pageStart: this.currentPage, //页面
                    // pageRequestSize: this.currentCount //请求数据数量
                    // machine: '0', //设备号
                    // name: '店名',//门店名称
                    // deleteFlag: '0', //查询存续
                    page: this.currentPage, //页面
                    list_rows: this.currentCount //请求数据数量
                }))
                .then(res => {
                    console.log(res);
                    if (res.data.code === 200) {
                        let businessHours;
                        let list = [];
                        let data = res.data.data.data;
                        data.forEach(item => {
                            // if (!item.startTime && !item.endTime) {
                            //     businessHours = "";
                            // } else {
                            //     businessHours =
                            //         item.startTime + "-" + item.endTime;
                            // }
                            list.push({
                                id: item.id, //店铺id,一台设备一个店铺
                                // equipmentNumber: item.machine, //设备号
                                // devoteTime: item.createTime, //投入时间
                                // clerkNumber: item.clerkNum, //店员数量
                                name: item.name, //门店名称
                                wash_num: item.wash_num,//洗车次数
                                wash_money: item.wash_money,//洗车金额
                                // storeAdress: item.address, //门店地址
                                // businessHours: businessHours, //营业时间
                                // imageQR: item.imageQR //小程序码
                            });
                        });
                        // console.log(list)
                        this.equipmentTable = list;
                        this.pageResultSize = res.data.data.total;
                    } 
                    // else if (res.data.code === 20004) {
                    //     that.$message({
                    //         type: "error",
                    //         message: "请重新登录！"
                    //     });
                    //     that.$router.push("/");
                    // } else if (res.data.code === 20006) {
                    //     this.equipmentTable = [];
                    // }
                });
        },
        // 点击的第几页
        currentPageCount: function(val) {
            this.currentPage = val;
            utils
                .request("/shop/list", "post", {
                    page: this.currentPage, //页面
                    list_rows: this.currentCount //请求数据数量
                })
                .then(res => {
                    console.log(res);
                    if (res.data.code === 200) {
                        let businessHours;
                        let list = [];
                        let data = res.data.data.data;
                        data.forEach(item => {
                            list.push({
                                id: item.id, //店铺id,一台设备一个店铺
                                name: item.name, //门店名称
                                wash_num: item.wash_num,//洗车次数
                                wash_money: item.wash_money,//洗车金额
                            });
                        });
                        this.equipmentTable = list;
                        this.pageResultSize =
                            res.data.data.total; //数据库总结果数
                    }
                });
        }
    },
    mounted() {
        utils.request("/shop/list", "post", JSON.stringify({
            page: this.currentPage, //页面
            list_rows: this.currentCount//请求数据数量
        })).then(resp=>{
            this.searchshop = resp.data.data.data[0].id;
            this.equipmentTable = resp.data.data.data;
            this.pageResultSize = resp.data.data.total;
            this.shopname = resp.data.data.data;
            if(this.searchshop !== ""){
                this.getEchart();
            }
        })    
        utils.request("/dataShow/indexNum","post").then(resp=>{
            // console.log(resp)
            this.wash_money = resp.data.data.financeMoney;//订单金额
            this.wash_num = resp.data.data.financeWashNum; //洗车台次
            this.deviceNumber = resp.data.data.equipment_num;
        }) 
}
};
</script>

<style lang="scss" scoped>
>>>.el-table {
    >>> th,
    >>> tr {
        height: 50px;
        line-height: 50px;
    }
    >>> .cell {
        height: 50px;
        line-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    >>> td,
    >>> th {
        padding: 0;
    }
}
.all-home {
    .top {
        display: flex;
        flex-flow: row wrap;
        align-items: center;
        // justify-content: space-between;
        margin-bottom: 20px;
        padding: 20px;
        background: #fff;
        border-radius: 16px;
        .order-amount-all {
            display: flex;
            align-items: center;
            width: 24%;
            height: 120px;
            background: linear-gradient(to right, #8174e3, #e2b7f5);
            border-radius: 4px;
            margin-right: 20px;
            .order-amount {
                display: flex;
                justify-content: space-between;
                width: 100%;
                // height: 100px;
                // padding: 10px 0;
                .order-amount-flex {
                    width: 80%;
                    margin-left: 13px;
                    .order-amount-price {
                        font-size: 32px;
                        margin-bottom: 10px;
                        color: #fff;
                    }
                    .order-amount-title {
                        font-size: 18px;
                        color: #f5f5f5;
                    }
                }
                image,
                svg {
                    width: 80px;
                    height: 80px;
                    margin-right: 13px;
                }
            }
        }
        .top-up {
            background: linear-gradient(to right, #fb8185, #fcc2a1);
        }
        .car-wash {
            background: linear-gradient(to right, #ff7dce, #f59fbe);
        }
        .equipment {
            background: linear-gradient(to right, #5fadf3, #73c7f6);
        }
    }
    .middle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 560rpx;
        padding: 20px;
        background: #fff;
        border-radius: 16px;
        .middle-left {
            width: 58%;
            height: 560px;
            .middle-left-top {
                display: flex;
                align-items: center;
                .middle-left-top-title {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 80px;
                    height: 40px;
                    font-size: 22px;
                    background: #409eff;
                    border-radius: 4px;
                    color: #fff;
                }
                .middle-left-top-input {
                    width: 220px;
                    margin-left: 20px;
                }
            }
            .home-echart {
                width: 100%;
                height: 500px;
                margin-top: 20px;
            }
        }
        .middle-right {
            width: 40%;
            height: 560px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            .table-footer {
                display: flex;
                align-items: center;
                justify-content: space-between;
                height: 40px;
                .el-pagination {
                    padding: 0;
                }
                .el-button {
                    height: 40px;
                    padding: 0 20px;
                    margin-right: 10px;
                }
            }

            .icon-1 {
                width: 42px;
                height: 42px;
                vertical-align: -0.15em;
                fill: currentColor;
                overflow: hidden;
            }
            .icon1 {
                width: 38px;
                height: 38px;
            }
            .icon2 {
                width: 34px;
                height: 34px;
            }
        }
    }
    .bottom {
        .bottom-right {
            display: flex;
            align-items: center;
            width: 100%;
            // padding: 20px;
            margin-top: 20px;
            background: #fff;
            border-radius: 16px;
            .bottom-right-all {
                display: flex;
                width: 100%;
                // padding: 20px 0;
                .home-flex {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    width: 100px;
                    margin: 20px 0;
                    text-align: center;
                }
                img,
                svg {
                    width: 50px;
                    height: 50px;
                }
                .home-flex span {
                    font-size: 14px;
                    margin-top: 10px;
                    color: #333;
                }
            }
        }
    }
}
</style>

